package com.gitee.ywj1352.producer.rest;

import com.gitee.ywj1352.common.vo.ResponseVO;
import com.gitee.ywj1352.producer.biz.ProducerBiz;
import com.gitee.ywj1352.producer.pojo.Producer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.websocket.server.PathParam;

/**
 * Created by wenjie.yang on 6/26/2018.
 */
@RestController
@RequestMapping("/pd")
public class ProducerController {
    @Autowired
    private ProducerBiz producerBiz;

    @GetMapping("{id}")
    public ResponseVO getById(@PathParam("id")Long id){

        Producer producer = producerBiz.selectById(id);

        return  new ResponseVO(producer);

    }




}
